const mongoose = require('mongoose');
const edge = mongoose.model("edge",new mongoose.Schema({}),"edge")
const userInfo = mongoose.model("user_info",new mongoose.Schema({
    openid:{type:String},
    username:{type:String},
    avatar:{type:String},
    Signature:{type:String},
    edgeCount:{type:String},
    fans:{type:String},
    follows:{type:String},
    insAccount:{type:String},
    insPassword:{type:String},
    isVip:{type:Number},
    isVipExpire: {type:String},
}),"user_info")
const message = mongoose.model("message",new mongoose.Schema({
    content:{type:String},
    createAt:{type:Number},
    messageId:{type:String},
    src:{type:String},
    type:{type:String},
    user:{type:Object},
    src:{type:String},
    state:{type:String},
    openid:{type:String},
    pichref:{type:String}
}),"message")
const userEdge = mongoose.model("user_edge",new mongoose.Schema({}),"user_edge")
const edgeLike = mongoose.model("edge_like",new mongoose.Schema({
    create_at_utc:{type:String},
    edge_id:{type:String},
    like:{type:String},
    liker:{type:String},
    update_time:{type:String},
    user:{type:String},
}),"edge_like")
const follower = mongoose.model("follower",new mongoose.Schema({}),"follower")
const info = mongoose.model("base_info",new mongoose.Schema({
    edge_followed_by:{type: Number},
    type: {type: String},
    highlight_reel_count: {type: Number},
    full_name: {type: String},
    edge_follow: {type: Number},
    username: {type: String},
    edge_felix_video_timeline: {type: Number},
    profile_pic_url_hd: {type: String},
    id: {type: String},
    edge_owner_to_timeline_media: {type: Number},
    external_url: {type: String},
    biography: {type: String},
}),"base_info")

const order = mongoose.model('order', new mongoose.Schema({
    openid: {type: String},
    out_trade_no: {type: String},
    description: {type: String},
    price: {type: Number},
    statu: {type: Number},
}),'order')

const xiaochan = mongoose.model('xiaochan',new mongoose.Schema({
    weixin_name: { type: String },
    openid: { type: String }
}))

const config = mongoose.model('config', new mongoose.Schema({
    type: { type: String },
    content: { type: String }
}), 'config')

module.exports = {
    edge,
    userInfo,
    message,
    userEdge,
    edgeLike,
    follower,
    info,
    order,
    xiaochan,
    config
}